﻿using Prism.Ioc;
using SECSGEMServices;
using System.Windows;
using ZDevice.Event;
using ZZMES.Data;
using ZZMES.Process;
using ZZMES.TCP;
using ZZMES.Views;

namespace ZZMES
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App
    {
        protected override Window CreateShell()
        {
            Container.Resolve<ProcessInit>().Init();
            return Container.Resolve<MainWindow>();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterSingleton<IEventAggregator, ZDevice.Event.EventAggregator>();//事件聚合器
            containerRegistry.RegisterSingleton<DataProviderService>();
            containerRegistry.RegisterSingleton<TCPHostService>();

            containerRegistry.Register<ISecsGemService, KingSecsGemService>("切筋成型");
            containerRegistry.Register<ISecsGemService, KingSecsGemService>("激光打标");                //mes服务
            containerRegistry.Register<ISecsGemService, KingSecsGemService>("框架打标");                
            containerRegistry.Register<ISecsGemService, KingSecsGemService>("冲胶1");
            containerRegistry.Register<ISecsGemService, KingSecsGemService>("冲胶2");
            containerRegistry.Register<ISecsGemService, KingSecsGemService>("排片1");
            containerRegistry.Register<ISecsGemService, KingSecsGemService>("排片2");
            containerRegistry.Register<ISecsGemService, KingSecsGemService>("半自动切筋1");
            containerRegistry.Register<ISecsGemService, KingSecsGemService>("塑封1");
            containerRegistry.Register<ISecsGemService, KingSecsGemService>("塑封2");


            containerRegistry.RegisterSingleton<ProcessInit>();                
        }
    }
}
